package com.yc.cloud.portal.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;

@ApiModel
@Data
public class MediaCaptureParam {

    @Schema(description = "设备编号", required = true)
    @NotEmpty(message = "设备编号不能为空")
    private String deviceNum;

    @Schema(description = "抓拍时间,格式yyyy-MM-dd HH:mm:ss", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 指定日期格式
    @NotNull(message = "抓拍时间不能为空")
    private LocalDateTime captureTime;


    @Schema(description = "图片名称,包含后缀名,如test.jpg", required = true)
    @NotEmpty(message = "图片名称不能为空")
    private String picName;

    @Schema(description = "图片Base64编码,不用包含data:image/jpeg;base64前缀", required = true)
    @NotEmpty(message = "图片Base64编码不能为空")
    private String picString;

    @Schema(description = "通道号", required = true)
    @NotEmpty(message = "通道号不能为空")
    private String channelCode;
}
